How to draw the midpoint of a line segmant